package com.api.tournament.service;
import com.api.core.config.AuthUser;
import com.api.tournament.model.Tournament;
import com.api.core.service.Service;
import com.api.core.response.Result;
import com.api.tournament.model.TournamentRewardUser;
import com.api.tournament.vo.TournamentAdd;
import com.api.tournament.vo.TournamentTeamUserVo;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

/**
 * Created by wanghuiwen on 2021/03/23.
 */
public interface TournamentService extends Service<Tournament> {
   Result list(Integer state, String tournamentName, Integer tournamentType, Boolean hot, Long gameId, String tournamentCategory, Long createUser, Integer format, String order, Integer page, Integer size, AuthUser user);

    Result add(TournamentAdd tournamentAdd, AuthUser userId);

    Result detail(Long id, Boolean isCheckIn);

    Result rewardConfirm(Long rewardId, Boolean confirm);

    Result review(Long tournamentId, Integer examine, String reason, AuthUser authUser);

    Result signup(Long tournamentId, Long teamId, AuthUser user, String[] userId);

    Result endRegistration(Long tournamentId);

    Result roundLog(Long tournamentId);

 /**
  *
  * @param type 1收益管理 2 提现历史
  * @param status
  * @param organizationName
  * @param authUser
  * @param page
  * @param size
  * @param order
  * @return
  */
 Result organization(Integer type, Integer status, String organizationName, AuthUser authUser, Integer page, Integer size, String order);

 Result withdrawalApply(Long tournamentId, String bankName, String userName, String bankAccount);

 Result agree(Long tournamentId, Integer status, String refuse, BigDecimal withdrawalProfit);

    Result rewardList(Integer state, String hostName, String order, Integer page, Integer size);

 Result top(Long tournamentId, Boolean top);

 Result userlist(Integer state, Long gameId, String order, Integer page, Integer size, AuthUser user);

 Result contestant(Long tournamentId);

    Result rewardGrant(TournamentRewardUser rewardUser);

 Result grantConfirm(Long rewardId, Boolean confirm);

 Result checkin(Long tournamentId, Long userId);

    /**
     * 赛事状态 1 待审核  2 报名中 3进行中 4已结束 5 未通过 6 草稿
     * @return
     */
    List<Map<String, Object>> analysis();

    List<Tournament> listByStatus(int i);

    /**
     * 获取参赛的人员信息
     * @param tournamentId
     * @return
     */
    List<TournamentTeamUserVo> joinUser(Long tournamentId);

    Result reset(Long tournamentId);

    Result updateTeam(Long tournamentId, Long teamId, AuthUser user, String[] userId);
}
